package cn.itcast.nems.studentrecord.constant;

import lombok.Getter;

/**
 * <p>
 * 性别类型枚举
 * </p>
 *
 * @author zhouwei
 * @since 2024/3/11 4:30 PM
 **/
@Getter
public enum GenderEnum {
    MAN("男"), WOMEN("女");
    private final String name;

    GenderEnum(String name) {
        this.name = name;
    }
    public static GenderEnum getByName(String name) {
        GenderEnum[] contractTypeEnums = values();
        for (GenderEnum contractTypeEnum : contractTypeEnums) {
            if (contractTypeEnum.getName().equals(name)) {
                return contractTypeEnum;
            }
        }
        return null;
    }
}
